package presentacion;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextPane;



/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class GUIAcercaDe extends javax.swing.JDialog {
	/**
	 * 
	 */
	private static final long serialVersionUID = -4757107885020779964L;
	private JLabel labelImage;
	private ImageIcon logo;
	private JButton jButton1;
	//private Canvas canvas1;
	private JTextPane jTextPane1;
	
	public GUIAcercaDe(JFrame frame) {
		super(frame);
		initGUI();
		this.setLocationRelativeTo(null);
	}
	
	private void initGUI() {
		try {	
				logo = new ImageIcon(getClass().getClassLoader().getResource("imagenes/ucm.gif"));
				//logo = Toolkit.getDefaultToolkit().getImage("imagenes/ucm.gif");
			{
				getContentPane().setLayout(null);
				this.setTitle("Acerca de");
				{
					jButton1 = new JButton();
					getContentPane().add(jButton1);
					jButton1.setText("Aceptar");
					jButton1.setBounds(154, 106, 99, 22);
					jButton1.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							Container d = ((JButton)evt.getSource()).getParent();
							Container e = d.getParent();
							Container f = e.getParent();
							Container g = f.getParent();
							((JDialog)g).setModal(false);
							g.setVisible(false);
						}
					});
				}
				{
					jTextPane1 = new JTextPane();
					getContentPane().add(jTextPane1);
					jTextPane1.setText("Algoritmos de aprendizaje\n\t Juan, Jorge y Alberto");
					jTextPane1.setBounds(208, 37, 201, 36);
					jTextPane1.setEditable(false);
					jTextPane1.setBackground(this.getBackground());
				}
				{
					labelImage = new JLabel();
					getContentPane().add(labelImage);
		        	labelImage.setIcon(logo);
		        	labelImage.setBounds(37, 28, 166, 73);
					/*canvas1 = new Canvas(){
						
						private static final long serialVersionUID = -1903642124702277707L;

						public void paint(Graphics g) {
						    g.drawImage(logo, 0,0, this);
						    }
					};
					
					getContentPane().add(canvas1);
					canvas1.setBounds(37, 28, 166, 73);*/
					
				}
			}
			this.setSize(432, 169);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
